Skip to content

ja: read large operators in Japanese word order - #726

Merged
moritz-gross merged 2 commits into
daisy:jafrom
yasumorishima:ja-sum-integral
Aug 29, 2026
Merged

ja: read large operators in Japanese word order#726
moritz-gross merged 2 commits into
daisy:jafrom
yasumorishima:ja-sum-integral

Conversation

@yasumorishima

Copy link
Copy Markdown
Contributor

Follows #725 on the ja branch. Same class of problem as the brackets PR: the English preposition order was kept, and the Japanese equivalents are postpositions.

Sums, products and integrals

bigop-both (a large operator with both limits) read the sum from 1 to n of i as

総和 から i イコール 1, に n の i

which places each preposition where English puts it. Japanese marks a range with the postpositions から … まで, so the limits come first:

総和 i イコール 1 から, n まで オブ i

This is item 6 of Yamaguchi, Kawane and Sawazaki (1996), which gives the reading for a summation as サム i イコール 1 から n まで(オブ)… and for a definite integral as インテグラル a から b まで(オブ)….

The trailing connective becomes オブ rather than の. 「n までの i」 is grammatical Japanese, but it means "i, from 1 to n" — の attaches the operand to the range instead of introducing the summand, so the listener hears the wrong parse. Item 3 of the same paper is why the borrowed オブ is the right form here (the paper introduces オブ and オーバー as loan prepositions for exactly this purpose).

bigop-under (lower limit only) used 分の for "over". 分の is the fraction word — 「A 分の B」 is B/A — so a sum with a single limit was read as if a fraction were involved. It is now にわたる, which is the word this repo's own definitions.yaml already uses for the sum intent (function=総和 | にわたる | から,まで).

Checks

  • audit-translations ja: unchanged. Rule differences 28 and untranslated 3683, both before and after. I measured the baseline on a detached checkout of ja at 544e7fb rather than reusing an earlier number, since ja moved while I was working.
  • Test expectations are the actual CI output, not guesses. Added summation_lower_limit_only and product_with_limits.

Deliberately not changed

The operator names themselves — 総和 for ∑, 積分 for ∫, プロダクト for ∏ — are left alone. They are correct Japanese, and the cited paper's appendix offers サム / 大文字シグマ for ∑ as alternatives rather than corrections.

The interval rules (intervals in SharedRules/general.yaml and ClearSpeak-intervals) have the same から … に shape and need the same fix, but they also need decisions this PR does not: 間隔 should be 区間 (間隔 means spacing, not a mathematical interval), and the "not including" wording currently reads コメントはありません — "there are no comments", from translating the bare word "not". I would rather send that separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants